<template>
  <van-nav-bar title="联系我们" left-arrow @click-left="goBack" @click-right="isShare = true" />

  <div>
    <baidu-map class="map" style="overflow:auto" :center="{ lng: 113.314681, lat: 23.103578 }" :zoom="15">
      <bm-control :offset="{ width: '10px', height: '10px' }">
        <bm-auto-complete v-model="keyword" :sugStyle="{ zIndex: 1 }">
          <input placeholder="请输入地名关键字" />
        </bm-auto-complete>
      </bm-control>
      <bm-local-search :keyword="keyword" :auto-viewport="true"></bm-local-search>
    </baidu-map>
  </div>

  <!-- <div>
    <baidu-map class="map" style="height: 500px" :center="{ lng: 113.314681, lat: 23.103578 }" :zoom="15">
      <bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT"></bm-city-list>
    </baidu-map>
  </div> -->
</template>

<script setup>
import { ref } from 'vue';

const keyword = ref();
import { BaiduMap } from 'vue-baidu-map-3x'

const { proxy } = getCurrentInstance()
const goBack = () => {
  proxy.$router.go(-1)
}
const getProductInfoData = async () => {
  let result = await Api.ProductInfo({
    proid: proid.value,
    busid: LoginUser.id ?? 0
  })
}
</script>

<style>
.map {
  width: 100%;
  height: 500px;
}
</style>
